package cn.wsalix.query;

public enum OrderQuery {
	today("1", "今日"),close("2", "关闭订单"),untreatedOrder("3", "未处理订单");
	private String code;
	private String title;

	OrderQuery(String code, String title) {
		this.code = code;
		this.title = title;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public static OrderQuery findByCode(String code) {
		for (OrderQuery userKind : OrderQuery.values()) {
			if (userKind.getCode().equals(code)) {
				return userKind;
			}
		}
		return null;
	}

}
